Ultrasonic transducers can be used for measuring the level of a fluid (for example, diesel exhaust fluid (DEF)) in a container as well as a specific gravity of the fluid to determine the quality, concentration, viscosity or grade (in the case of oils) of the fluid. The transducer is positioned at either the top or bottom of a tank containing the fluid. An ultrasonic signal is generated by the transducer and the time it takes for the signal to travel from the transducer at the top or bottom of a tank to the surface of the fluid, reflect off the surface of the fluid, and return to the transducer is measured. Phase errors and lobe shift errors may be introduced while measuring the ultrasonic signal reflected off the surface of the fluid as a result of sloshing of the fluid, thermocline within the fluid, and other reasons. These errors affect accurate measurement of the various characteristics of the fluid.